# !/usr/bin/python3
# -*- coding: utf-8 -*-

"""
用户与岗位关联表模型类
----------------------------------------------------
@Project :   xinhou-openai-framework
@File    :   UserPost.py
@Contact :   sp_hrz@qq.com

@Modify Time      @Author    @Version    @Desciption
------------      -------    --------    -----------
2023/04/16 22:04  peng.shen   v1.0.0     None
"""

from typing import Optional

from pydantic import BaseModel, Field


class ReqUserPostFindSchema(BaseModel):
    """
    用户与岗位关联表 查询入参参数&校验模型
    """

    id: Optional[int] = Field(default=None, title="主键ID", )
    user_id: Optional[int] = Field(default=None, title="用户ID", )
    post_id: Optional[int] = Field(default=None, title="岗位ID", )


class ReqUserPostSaveSchema(BaseModel):
    """
    用户与岗位关联表 保存入参参数&校验模型
    """

    user_id: Optional[int] = Field(title="用户ID", )
    post_id: Optional[int] = Field(title="岗位ID", )


class ReqUserPostUpdateSchema(BaseModel):
    """
    用户与岗位关联表 查询入参参数&校验模型
    """

    id: Optional[int] = Field(title="主键ID", )
    user_id: Optional[int] = Field(title="用户ID", )
    post_id: Optional[int] = Field(title="岗位ID", )


class ResUserPostDetailSchema(BaseModel):
    """
    用户与岗位关联表 查询入参参数&校验模型
    """

    id: Optional[int] = Field(default=None, title="主键ID", )
    user_id: Optional[int] = Field(default=None, title="用户ID", )
    post_id: Optional[int] = Field(default=None, title="岗位ID", )
